<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <f:subview id="acessoEmbutido" rendered="#{fluxoExibicaoLogin.exibirFormularioCadastro}">
        <h:panelGrid columns="1" id="embCadUser" styleClass="center">
            <h:panelGroup id="formCadUser" styleClass="esquerda">
                <h:form id="cadUserForm" styleClass="formularioFundo">
                    <h:panelGrid columns="3" id="pai" styleClass="bvb-font">
                        <f:facet name="header">
                            <h:outputText value="#{msg.cadUserPanelGridTitle2}" styleClass="formularioTitle"/>
                        </f:facet>

                        <h:outputLabel value="#{msg.nome}:" id="labelNome" title="#{msg.titleNomeCadUser2}"/>
                        <p:inputText value="#{userAcessoManager.usuarioCadastro.nome}" id="userNameCad" required="true"
                                     requiredMessage="#{msg.campoObrigatorio}" title="#{msg.titleNomeCadUser2}" label="#{msg.nome}"
                                     maxlength="30" size="30">
                            <f:validateLength minimum="3" maximum="30"/>
                        </p:inputText>
                        <p:message for="userNameCad"/>

                        <h:outputLabel value="#{msg.sobreNome}:" id="labelSobreNome" title="#{msg.titleSobreNomeCadUser2}"/>
                        <p:inputText value="#{userAcessoManager.usuarioCadastro.sobreNome}" id="userSobreNameCad" required="true"
                                     requiredMessage="#{msg.campoObrigatorio}" title="#{msg.titleSobreNomeCadUser2}" label="#{msg.sobreNome}"
                                     maxlength="30" size="30">
                            <f:validateLength minimum="3" maximum="30"/>
                        </p:inputText>
                        <p:message for="userSobreNameCad"/>

                        <h:outputLabel value="#{msg.login}:" id="labellogin" title="#{msg.titleLoginCadUser3}"/>
                        <p:inputText value="#{userAcessoManager.usuarioCadastro.login}" id="userloginCad" required="true"
                                     requiredMessage="#{msg.campoObrigatorio}" title="#{msg.titleLoginCadUser3}" label="#{msg.login}"
                                     maxlength="10" size="30">
                            <f:validateLength minimum="5" maximum="10"/>
                        </p:inputText>
                        <p:message for="userloginCad"/>

                        <h:outputLabel value="#{msg.email}:" id="labelemail" title="#{msg.titleEmailCadUser3}"/>
                        <p:inputText value="#{userAcessoManager.usuarioCadastro.email}" id="useremailCad" required="true"
                                     requiredMessage="#{msg.campoObrigatorio}" title="#{msg.titleEmailCadUser3}" label="#{msg.email}"
                                     maxlength="100" size="30" onkeyup="verificaEmail('promsg');">
                            <f:validateLength minimum="3" maximum="100"/>
                            <f:validator validatorId="emailValidador"/>
                        </p:inputText>
                        <p:message for="useremailCad"/>

                        <h:outputLabel value="#{msg.email}:" id="labelemail2" title="#{msg.titleEmailCadUser4}"/>
                        <p:inputText value="#{userAcessoManager.email2}" id="useremailCad2" required="true"
                                     requiredMessage="#{msg.campoObrigatorio}" title="#{msg.titleEmailCadUser4}" label="#{msg.email}"
                                     maxlength="100" size="30" onkeyup="verificaEmail('promsg');">
                            <f:validateLength minimum="3" maximum="100"/>
                            <f:validator validatorId="emailValidador"/>
                        </p:inputText>
                        <h:panelGroup>
                            <span class="red" id="promsg"></span><br></br>
                            <p:message for="useremailCad2"/>
                        </h:panelGroup>
                        <h:outputText value=""/>
                        <p:captcha label="Captcha" language="pt" theme="white" id="captcha"/>
                        <p:message for="captcha"/>

                        <h:outputText value=""/>
                        <h:panelGroup id="buttonGroup">
                            <p:commandLink actionListener="#{userAcessoManager.salvarUsuario(event)}" update="msgLogin,cadUserForm" ajax="false"
                                           title="#{msg.titleButtonSalvarCadUser4}" id="buttonSalvar" styleClass="ui-button_link">
                                <h:graphicImage library="img" name="bt_salvar.png"/>
                            </p:commandLink>
                            <p:spacer width="2" height="2"/>
                            <h:commandButton  title="#{msg.titleButtonCleanCadUser2}" immediate="true" image="/resources/img/bt_limpar_red.png"
                                              id="buttonLimpar"  actionListener="#{userAcessoManager.clean()}">

                            </h:commandButton>
                        </h:panelGroup>
                    </h:panelGrid>
                </h:form>
            </h:panelGroup>
        </h:panelGrid>
    </f:subview>
</ui:composition>